Home

Introduction

Distance & Time API

version 2

Distance & Time is web application, which allows to calculate distances and transit time between two points using different modes of transport.

OpenAPI Specification

Start designing your API in minutes. The OpenAPI specification file enables you to learn and interact with API elements, including all available endpoints, input and output representations.

General information

Distance & Time API is organized around REST.
Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

API endpoint#

1https://sirius.searates.com

All endpoints are only accessible via HTTPS and are located at sirius.searates.com

Distance and transit time calculator

get/api/distanceandtime

Get the best route and estimated time delivery.

Headers

Content-Typeapplication/json

Query Parameters
  • keyREQUIREDstring

    API key

  • lat_fromREQUIREDnumber

    The latitude value specifying the location for which you wish to obtain the closest point of loading.

  • lng_fromREQUIREDnumber

    The longitude value specifying the location for which you wish to obtain the closest point of loading.

  • lat_toREQUIREDnumber

    The latitude value specifying the location for which you wish to obtain the closest point of discharge.

  • lng_toREQUIREDnumber

    The longitude value specifying the location for which you wish to obtain the closest point of discharge.

  • typeREQUIREDstring

    Type of transportation.

    Allowed values:seaairroadrail

  • speedOptionalnumber

    Speed for the selected type of transport. If speed is not set, it will be defaulted depending on the type (sea - 13 knots, air - 800 km/h, road - 35 km/h, rail - 35 km/h).

  • road_speedOptionalnumber

    Transport speed to ports. Used for types sea, air. By default 35 km/h.

    Default:35

  • routing_modeOptionalstring

    This parameter specifies which mode should be used when calculating the route. By default it takes the value short - the shortest route from the point of departure to the point of arrival; it can also take the value safe - a route that is built taking into account the current geopolitical situation in the world.

    Allowed values:shortsafe

    Default:short

Response example
OK
1{
2  "road": {
3    "dist": 526.07,
4    "distance": 526.07,
5    "from_lat": 40.4165,
6    "from_lng": -3.70256,
7    "from_name": "Madrid, Comunidad de Madrid, Spain",
8    "path": [
9      [
10        40.41674,
11        -3.70233
12      ],
13      [
14        39.7883199999995,
15        -2.42739000000004
16      ],
17      [
18        39.70590999999947,
19        -2.389710000000039
20      ],
21      [
22        39.63814999999948,
23        -2.329050000000039
24      ],
25      [
26        39.565569999999475,
27        -2.275720000000041
28      ],
29      [
30        39.50520999999937,
31        -2.2087400000000463
32      ],
33      [
34        39.452099999999305,
35        -0.5494100000000518
36      ],
37      [
38        39.390839999999294,
39        -0.4822100000000522
40      ],
41      [
42        39.32844999999926,
43        -0.41705000000005255
44      ],
45      [
46        39.23836999999929,
47        -0.4117400000000524
48      ],
49      [
50        39.16478999999931,
51        -0.35941000000005224
52      ],
53      [
54        39.117579999999286,
55        -0.28245000000005227
56      ],
57      [
58        39.04547999999924,
59        -0.2285600000000526
60      ],
61      [
62        38.96028999999921,
63        -0.1989300000000524
64      ],
65      [
66        38.90637999999916,
67        -0.12685000000005262
68      ],
69      [
70        38.87218999999912,
71        -0.04347000000005263
72      ],
73      [
74        38.81785999999918,
75        0.028399999999947367
76      ],
77      [
78        38.99626999999999,
79        1.2135600000000002
80      ],
81      [
82        38.9788,
83        1.3019500000000004
84      ],
85      [
86        38.963390000000025,
87        1.3911200000000008
88      ],
89      [
90        38.90857899999997,
91        1.4331360000000015
92      ]
93    ],
94    "ferry_paths": [
95      [
96        [
97          38.84428,
98          0.11434
99        ],
100        [
101          38.844179999999994,
102          0.11431999999999999
103        ],
104        [
105          38.84260999999999,
106          0.11442
107        ],
108        [
109          38.84188999999999,
110          0.11578999999999999
111        ],
112        [
113          38.84318999999999,
114          0.11973999999999999
115        ],
116        [
117          38.84456999999999,
118          0.12213999999999998
119        ],
120        [
121          38.88312999999999,
122          0.38972999999999997
123        ],
124        [
125          38.90101999999999,
126          0.51393
127        ],
128        [
129          38.907009999999985,
130          0.55898
131        ],
132        [
133          38.91525999999998,
134          0.62099
135        ],
136        [
137          38.921599999999984,
138          0.6686500000000001
139        ],
140        [
141          38.927539999999986,
142          0.7132700000000001
143        ],
144        [
145          38.93598999999999,
146          0.77539
147        ],
148        [
149          38.95538999999999,
150          0.9225300000000001
151        ],
152        [
153          38.95688999999999,
154          0.9339400000000001
155        ],
156        [
157          38.99626999999999,
158          1.2135600000000002
159        ],
160        [
161          38.978509999999986,
162          1.2889500000000003
163        ],
164        [
165          38.97520999999998,
166          1.2966200000000003
167        ],
168        [
169          38.975129999999986,
170          1.2975100000000004
171        ],
172        [
173          38.975749999999984,
174          1.2980300000000005
175        ],
176        [
177          38.97582999999998,
178          1.2980200000000004
179        ]
180      ]
181    ],
182    "speed": "40 km/h",
183    "to_lat": 38.90883,
184    "to_lng": 1.43296,
185    "to_name": "Ibiza, Comunitat Autonoma de les Illes Balears, Spain",
186    "transit_time_days": "1 days",
187    "transit_time_seconds": 47346
188  }
189}